import { mobxState } from "@/data";

// 退出登录，清理各种痕迹
const clearLoginHistory = async () => {
    try {

        window.sessionStorage.removeItem("buttomList");
        window.sessionStorage.removeItem("routes");
        window.sessionStorage.removeItem("gpData");
        window.sessionStorage.removeItem("modules");
        window.sessionStorage.removeItem("codeTarget");
        window.sessionStorage.removeItem("userCode");
        window.sessionStorage.removeItem("userInfo");
        window.sessionStorage.removeItem("authenticationKey");
        window.sessionStorage.removeItem("tabs");
        window.sessionStorage.removeItem("CodeTargetListByStat");
        window.sessionStorage.removeItem("keyCodeList");
        window.sessionStorage.removeItem("unit");
        window.sessionStorage.removeItem("allUnit");
        window.sessionStorage.removeItem("roleDataList");
        window.sessionStorage.removeItem("roleCode");
        window.sessionStorage.removeItem("keyCodeList");
        window.sessionStorage.removeItem("token");
        window.sessionStorage.removeItem("activeTabKey");
        window.sessionStorage.removeItem("permissionList");
        window.sessionStorage.removeItem("activeTabKey");
        mobxState.setTabs = [];
        mobxState.updatePermissionList = [];

    } catch (error) {

    } finally {
        window.location.reload();
    }

}
export default clearLoginHistory